import { Button, ButtonProps } from 'antd';
import React from 'react';
import styled from 'styled-components';

interface StyledButtonProps {
  activated?: boolean;
}
export const StyledButton = styled(
  React.forwardRef<HTMLButtonElement, StyledButtonProps & ButtonProps>(
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    ({ activated, ...props }, ref) => (
      <Button
        ref={ref}
        {...props}
        type='default'
      />
    ),
  ),
)<StyledButtonProps>`
  position: relative;
  display: flex;
  background-color: ${({ activated }) =>
    activated ? '#ffffff' : 'transparent'};
  border-radius: 4px;
  padding: 7px 10px !important;
  border: 1px transparent;
  box-shadow: none;
`;

export const StyledToggleToolButton = styled.div`
  display: flex;
  flex-direction: row;
  gap: 4px;
`;

export const StyledSplitToolButton = styled.div`
  position: relative;
  .split-dropdown-wrapper {
    position: absolute;
    top: 0;
    left: -5px;
    padding-top: 40px;
    .split-dropdown {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      background-color: #ffffff90;
      padding: 5px;
      border-radius: 4px;
      border: 1px solid rgba(0, 0, 0, 0.12);

      li {
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        display: flex;

        &:hover {
          background-color: white;
          border-radius: 4px;
        }
      }
    }
  }
`;
